﻿using System;
using System.Collections.Generic;
using System.Text;
using WebSocketCore.Domain.Account;

namespace WebSocketCore.Domain.Impl
{
    public class UserManager : IUserManager
    {
        public IUser CheckUser(string userName,string pwd)
        {
            int qq;
            int.TryParse(userName, out qq);
            if (qq == 0)
            {
                return null;
            }
            else
            {
                //TODO Db
                return new User() { Id = qq.ToString(), Name = qq.ToString() };
            }
        }

        public IUser GetUser(string Id)
        {
            //TODO Db
            return new User() { Id = Id, Name = Id };
        }
    }
}
